package com.lone.design.pattern.creational.factorymethod;

/**
 * @author Lone
 * @date 2021/9/24 13:38 周五
 */
public class Test {
    public static void main(String[] args) {
        // 创建咖啡店对象
        CoffeeStore store = new CoffeeStore();
        // 需要的咖啡
        store.setFactory(new AmericanCoffeeFactory());
        Coffee coffee = store.orderCoffee();
        System.out.println(coffee.getName());
    }
}
